package com.xthink.web.controller;

import com.xthink.common.result.AjaxResult;
import com.xthink.common.vo.order.OrderListVo;
import com.xthink.web.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    //模糊搜索
    @PostMapping("/list")
    private AjaxResult orderLikeList(@RequestBody OrderListVo orderListVo){
        return orderService.orderLikeList(orderListVo);
    }

    //退款
    @GetMapping("/drawBack/{ids}")
    public AjaxResult drawBack(@PathVariable("ids")Integer[] ids){
        return orderService.drawBack(ids);
    }
}
